

using MoMing.VideoTool.Downloader.Apis;
using MoMing.VideoTool.Downloader.Extensions;

var builder = WebApplication.CreateBuilder(args);


builder.AddServiceDefaults();
builder.AddApplicationServices();
builder.Services.AddProblemDetails();

var withApiVersioning = builder.Services.AddApiVersioning();

builder.AddDefaultOpenApi(withApiVersioning);

var app = builder.Build();


app.MapDefaultEndpoints();

var moMingVideoToolDownloader = app.NewVersionedApi();
moMingVideoToolDownloader.MapDownloaderApiV1();


app.UseDefaultOpenApi();
app.Run();
